package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CheckInOutMapper;
import com.ruoyi.system.domain.CheckInOut;
import com.ruoyi.system.service.ICheckInOutService;

/**
 * 入住/退房Service业务层处理
 * 
 * @author txy
 * @date 2022-02-09
 */
@Service
public class CheckInOutServiceImpl implements ICheckInOutService 
{
    @Autowired
    private CheckInOutMapper checkInOutMapper;

    /**
     * 查询入住/退房
     * 
     * @param roomId 入住/退房主键
     * @return 入住/退房
     */
    @Override
    public CheckInOut selectCheckInOutByRoomId(Long roomId)
    {
        return checkInOutMapper.selectCheckInOutByRoomId(roomId);
    }

    /**
     * 查询入住/退房列表
     * 
     * @param checkInOut 入住/退房
     * @return 入住/退房
     */
    @Override
    public List<CheckInOut> selectCheckInOutList(CheckInOut checkInOut)
    {
        return checkInOutMapper.selectCheckInOutList(checkInOut);
    }

    /**
     * 新增入住/退房
     * 
     * @param checkInOut 入住/退房
     * @return 结果
     */
    @Override
    public int insertCheckInOut(CheckInOut checkInOut)
    {
        return checkInOutMapper.insertCheckInOut(checkInOut);
    }

    /**
     * 修改入住/退房
     * 
     * @param checkInOut 入住/退房
     * @return 结果
     */
    @Override
    public int updateCheckInOut(CheckInOut checkInOut)
    {
        return checkInOutMapper.updateCheckInOut(checkInOut);
    }

    /**
     * 批量删除入住/退房
     * 
     * @param roomIds 需要删除的入住/退房主键
     * @return 结果
     */
    @Override
    public int deleteCheckInOutByRoomIds(Long[] roomIds)
    {
        return checkInOutMapper.deleteCheckInOutByRoomIds(roomIds);
    }

    /**
     * 删除入住/退房信息
     * 
     * @param roomId 入住/退房主键
     * @return 结果
     */
    @Override
    public int deleteCheckInOutByRoomId(Long roomId)
    {
        return checkInOutMapper.deleteCheckInOutByRoomId(roomId);
    }
}
